# include "main.h"
void Shumaguan(int a,int b)    //aʇµڼ¸λ£¬bʇʇʽז¼¸
{
	switch(a) 			//λѡ£¬ͨ¹ýP2_4,P2_3,P2_2µĶþ½øֆת»¯Ϊʮ½øֆʽµĊýֵѡԱʇĄһλ£¬עҢµ±ש³ɵĊýֵʇ0ʱʇµڒ»λ£¬Ҁ´΍ùº󍆣¬´˴ú«Ϊ·½±㣬ʵ²Ύª1ʱ£¬µڒ»¸öµƁÁ
	{
	case 1 :
					{
						P2_4=0,P2_3=0,P2_2=0;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;			//¶Α¡£¬ͨ¹ý°ˎ»2½øֆµı£¬0£¬¿ؖư˸öµƵāÁð£¬ԙת»¯³ɱ6½øֆʽ
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;

	case 2 :
					{
						P2_4=0,P2_3=0,P2_2=1;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;
	case 3 :
					{
						P2_4=0,P2_3=1,P2_2=0;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;
	case 4 :
					{
						P2_4=0,P2_3=1,P2_2=1;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;
	case 5 :
					{
						P2_4=1,P2_3=0,P2_2=0;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;
	case 6 :
					{
						P2_4=1,P2_3=0,P2_2=1;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;
	case 7 :
					{
						P2_4=1,P2_3=1,P2_2=0;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;
	case 8 :
					{
						P2_4=1,P2_3=1,P2_2=1;
						switch(b){case 0 :P0=0x3F;break;
											case 1 :P0=0x06;break;
											case 2 :P0=0x5B;break;
											case 3 :P0=0x4F;break;
											case 4 :P0=0x66;break;
											case 5 :P0=0x6D;break;
											case 6 :P0=0x7D;break;
											case 7 :P0=0x07;break;
											case 8 :P0=0x7F;break;
											case 9 :P0=0x67;break;}
					}break;					
	}
}